package com.scs.application.modules.base.enums;


import com.scs.application.consts.GlobalConsts;
import com.scs.application.core.dto.ExcelImportField;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class ExcelImportBaseDataConfig {
    // 导入商品excel
    public static List<ExcelImportField>  getMatrDataImport() {
        List<ExcelImportField> exportHeadList = new ArrayList<ExcelImportField>();
        ExcelImportField headDTO;

        int index = 0;
        headDTO = new ExcelImportField();
        headDTO.setName("supplierName").setText("供应商名称").setCellIndex(index).setRequired(true).setMaxLength(100).setInputRemark("公司全名");
        exportHeadList.add(headDTO);

        index++;
        headDTO = new ExcelImportField();
        headDTO.setName("materialName").setText("商品名称").setCellIndex(index).setRequired(true).setMaxLength(300);
        exportHeadList.add(headDTO);

        index++;
        headDTO = new ExcelImportField();
        headDTO.setName("materialSpecInput").setText("商品规格").setCellIndex(index).setRequired(true).setMaxLength(200);
        exportHeadList.add(headDTO);

        headDTO = new ExcelImportField();
        index++;
        headDTO.setName("manufacturerName").setText("生产厂家").setCellIndex(index).setRequired(true).setMaxLength(100);
        exportHeadList.add(headDTO);

        index++;
        headDTO = new ExcelImportField();
        headDTO.setName("unit").setText("单品单位").setCellIndex(index).setRequired(true).setMaxLength(10);
        exportHeadList.add(headDTO);

        headDTO = new ExcelImportField();
        index++;
        headDTO.setName("price").setText("单品单价").setCellIndex(index).setRequired(true).setMaxLength(14).setNumber(true).setInputRemark("单位:元");
        exportHeadList.add(headDTO);

        index++;
        headDTO = new ExcelImportField();
        headDTO.setName("orderUnit").setText("订单单位").setCellIndex(index).setRequired(false).setMaxLength(10)
                .setInputRemark("送货单位"+GlobalConsts.SpecialSymbol.WRAP+"不填默认为单品单位");
        exportHeadList.add(headDTO);

        headDTO = new ExcelImportField();
        index++;
        headDTO.setName("orderQty").setText("订单单位比率").setCellIndex(index).setRequired(false).setMaxLength(14).setNumber(true)
                .setInputRemark("包含单品数量"+GlobalConsts.SpecialSymbol.WRAP+"不填默认1");
        exportHeadList.add(headDTO);

        headDTO = new ExcelImportField();
        index++;
        headDTO.setName("isConsignment").setText("寄售").setCellIndex(index).setRequired(true)
                .setMaxLength(4).setNumber(true).setCheckValueList(Arrays.asList("1","0"))
                .setInputRemark("代销类商品:1,"+ GlobalConsts.SpecialSymbol.WRAP+"购销类商品:0")
        ;
        exportHeadList.add(headDTO);

        headDTO = new ExcelImportField();
        index++;
        headDTO.setName("isOneThingOneYard").setText("标签管理").setCellIndex(index).setRequired(true).setMaxLength(4).setNumber(true)
                .setCheckValueList(Arrays.asList("1","0"))
                .setInputRemark("标签管理类商品:1"+GlobalConsts.SpecialSymbol.WRAP+"非标签管理类商品:0")
        ;
        exportHeadList.add(headDTO);

        headDTO = new ExcelImportField();
        index++;
        headDTO.setName("hisMedicareName2").setText("医保名称").setCellIndex(index).setRequired(false).setMaxLength(100);
        exportHeadList.add(headDTO);

        headDTO = new ExcelImportField();
        index++;
        headDTO.setName("hisMedicareNo").setText("医保代码20位").setCellIndex(index).setRequired(false).setMaxLength(50);
        exportHeadList.add(headDTO);

        headDTO = new ExcelImportField();
        index++;
        headDTO.setName("hisMedicareNo2").setText("医保代码27位").setCellIndex(index).setRequired(false).setMaxLength(50);
        exportHeadList.add(headDTO);

        headDTO = new ExcelImportField();
        index++;
        headDTO.setName("certificateNo").setText("注册证号").setCellIndex(index).setRequired(false).setMaxLength(50);
        exportHeadList.add(headDTO);

        headDTO = new ExcelImportField();
        index++;
        headDTO.setName("certificateExpiredStartDate").setText("注册证起").setCellIndex(index).setRequired(false)
                .setMaxLength(20).setDate(true)
                .setInputRemark("格式如: 2025-01-01")
        ;
        exportHeadList.add(headDTO);

        headDTO = new ExcelImportField();
        index++;
        headDTO.setName("certificateExpiredDate").setText("注册证止").setCellIndex(index).setRequired(false).setMaxLength(20).setDate(true)
                .setInputRemark("长期填 2099-01-01")
        ;
        exportHeadList.add(headDTO);

        return exportHeadList;
    }
}
